package com.financing.wap.dao.impl;

import java.math.BigDecimal;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.financing.wap.common.SqlName;
import com.financing.wap.dao.ISystemDao;
import com.financing.wap.dto.SwitchDTO;

@Repository("systemDao")
@SuppressWarnings(value={"deprecation"})
public class SystemDaoImpl extends BaseDaoImpl<Object, Integer> implements ISystemDao {

	
	
	@Override
	public Class<Object> getEntityClass() {
		
		return Object.class;
	}

	/**
	 * 获取对应开关的值 
	 */
	@Override
	public SwitchDTO getSwitch(String switchName) {
		return (SwitchDTO) sqlMapClientTemplate.queryForObject(SqlName.SYSTEM_STWICH, switchName);
	}

	@Override
	public String getPlatformRebate() {
		return (String) sqlMapClientTemplate.queryForObject(SqlName.PLATFORM_MONTH_REBATE);
	}

	@Override
	public BigDecimal getMollionsWealthCount() {
		return (BigDecimal) sqlMapClientTemplate.queryForObject(SqlName.MOLLIONS_WEALTH_COUNT);
	}

	@Override
	public String getSmsAdContent(String smsType) {
		return (String) this.sqlMapClientTemplate.queryForObject(SqlName.querySMSADContent,smsType);
	}

	@Override
	public Map<String, Object> getadminUserInfo(String id) {
		return (Map<String, Object>) this.getSqlMapClientTemplate().queryForObject(SqlName.SYSTEM_ADMIN_USER_INFO, id);
	}

}
